package cn.zou.core.page;

import java.util.List;

/**
 * 分页类
 * @author zoujin
 *
 * @param <T>
 */
public class Page<T> {
    //分页大小
	private int pageSize=5;
	//分页号
	private int pageNo;
	//分页的页数
	private int total;
	//总记录数
	private int totalPageCount;
	//集合bean
	private List<T> itmes;
	//搜索内容
	private String serach;
	//起始 数码
	private int startRow;
	public Page(int pageSize, int pageNo, int totalPageCount) {
		super();
		this.pageSize = pageSize;
		this.pageNo = pageNo;
		this.totalPageCount = totalPageCount;
		this.total=totalPageCount%pageSize==0?totalPageCount/pageSize:totalPageCount/pageSize+1;
		
	}
	
	public Page() {
		super();
	}

	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
		
		
	}

	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public int getTotalPageCount() {
		return totalPageCount;
	}
	public void setTotalPageCount(int totalPageCount) {
		this.totalPageCount = totalPageCount;
	}
	public List<T> getItmes() {
		return itmes;
	}
	public void setItmes(List<T> itmes) {
		this.itmes = itmes;
	}
	public String getSerach() {
		return serach;
	}
	public void setSerach(String serach) {
		this.serach = serach;
	}

	public int getStartRow() {
		this.startRow=(pageNo*pageSize);
		return startRow;
	}

	
	
	
}
